<html>
<head><meta charset="utf-8"><title>Vec of structs to struct of Vecs · t-libs · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/index.html">t-libs</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Vec.20of.20structs.20to.20struct.20of.20Vecs.html">Vec of structs to struct of Vecs</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="190467307"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Vec%20of%20structs%20to%20struct%20of%20Vecs/near/190467307" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ben <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Vec.20of.20structs.20to.20struct.20of.20Vecs.html#190467307">(Mar 13 2020 at 03:13)</a>:</h4>
<p>Hello, first message, hope I'm using zulip right.</p>
<p>I have a use-case, where syntactically, it's very convenient to use a vector of structs, but I hypothesise a big performance boost using a struct of vectors. There's a crate out there that does this with macros, but I was hoping to see a discussion about the notion of having something built into the language that allows the rust compiler to pass llvm a "struct of <code>$collection</code>s rather than a $collection of structs".</p>



<a name="190467602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Vec%20of%20structs%20to%20struct%20of%20Vecs/near/190467602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Vec.20of.20structs.20to.20struct.20of.20Vecs.html#190467602">(Mar 13 2020 at 03:19)</a>:</h4>
<p><span class="user-mention" data-user-id="271018">@Ben</span> Hey, I would actually recommend posting (and searching) about this on <a href="https://internals.rust-lang.org" target="_blank" title="https://internals.rust-lang.org">https://internals.rust-lang.org</a> to get general interest as this feature is probably more involved than just the libs team.</p>



<a name="190472110"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Vec%20of%20structs%20to%20struct%20of%20Vecs/near/190472110" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ben <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Vec.20of.20structs.20to.20struct.20of.20Vecs.html#190472110">(Mar 13 2020 at 05:13)</a>:</h4>
<p>done</p>



<a name="190482917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Vec%20of%20structs%20to%20struct%20of%20Vecs/near/190482917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Barretto <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Vec.20of.20structs.20to.20struct.20of.20Vecs.html#190482917">(Mar 13 2020 at 09:03)</a>:</h4>
<p>Edit: wrong convo</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>